package com.movie.ticketing.client;

import com.movie.ticketing.entity.User;
import com.movie.ticketing.entity.UserResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "user-service")
public interface UserServiceClient {
    @GetMapping("/api/user/{id}")
    UserResponse<User> getUserById(@PathVariable("id") Long id);

    @GetMapping("/api/user")
    UserResponse<List<User>> getAllUsers();
}